package com.example.a_lib

import android.annotation.SuppressLint
import android.content.Context

/**
 * Created by xiedongdong on 2020/11/28
 */
open class BizApplication : BaseApplication() {

    companion object {
        private var instance: BizApplication? = null
            get() {
                if (field == null) {
                    field = BizApplication()
                }
                return field
            }

        @Synchronized
        fun get(): BizApplication {
            return instance!!
        }


        @SuppressLint("StaticFieldLeak")
        lateinit var context: Context
            private set


    }


    override fun init() {
        context = this
        initARouter()
    }

    open fun initHeads(): MutableMap<String, String> {
        return mutableMapOf()
    }

    private fun initARouter() {
        // 必须写在init之前
    }


}
